package com.campusbackend.service.impl;

import com.campusbackend.entity.Skills;
import com.campusbackend.mapper.SkillsMapper;
import com.campusbackend.service.SkillsService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;

/**
 * <p>
 * 技能特长字典表 服务实现类
 * </p>
 *
 * @author yezi
 * @since 2025-07-24
 */
@Service
public class SkillsServiceImpl extends ServiceImpl<SkillsMapper, Skills> implements SkillsService {

    @Autowired
    private SkillsMapper skillsMapper;

    @Override
    public List<Skills> getAllActiveSkills() {
        return skillsMapper.getAllActiveSkills();
    }

    @Override
    public List<Long> getSkillIdsByNames(List<String> skillNames) {
        if (skillNames == null || skillNames.isEmpty()) {
            return new ArrayList<>();
        }
        return skillsMapper.getSkillIdsByNames(skillNames);
    }
}
